#!/usr/bin/python

import html


print html.header("text/html")

print html.start_html({"title":"icgi test page","lang":"en-GB"})

out = html.h1("Test of icgi") 
out += html.p("hello this is a paragraph",{"class":"normaltext"})
out += html.start_form({"method":"get","action":"test.cgi","name":"testform"})


options = { 1:"one",2:"two",3:"three" }

out += html.table(
  html.tr(
    html.th("Number") +
    html.td( html.form_select({"name":"number"},options=options,selected=2) ) 
    ) +
  html.tr(
    html.th("Comment") +
    html.td(html.form_textbox({"name":"comment","value":"I like python"}) )
    ) +
  html.tr(
    html.td(html.form_submit({"value":"Submit Me"}),{"colspan":2} ) )
  )


out += html.end_form()

print out
print html.end_html()

